$(document).ready(function () {
    initTable();
})

function initTable() {
    $('#list').bootstrapTable({
        url: 'http://localhost:8080/user/list',
        singleSelect:true,
        clickToSelect:true,
        classes:['table','table-striped','table-bordered'],
        columns: columns
    })
}

var columns = [
    {
        checkbox:true
    },{
    field: 'username',
    title: "用户名"
},{
    field:'password',
    title: '密码'
},{
    field:'isused',
    title:'是否启用',
    formatter:function (value,row,index) {
          if (value=='1'){
              return '启用';
          }
        if (value=='0'){
            return '禁用';
        }
    }
}]
